package com.neural.printer;

import java.util.List;

import com.neural.descriptor.KohonenState;
import com.neural.descriptor.ResultPojo;

public class NetPrettyPrinter {

	public static void printResults(List<ResultPojo> resultPojos) {
		StringBuilder builder = new StringBuilder("ResultPojoSets: \n");
		for (ResultPojo resultPojo : resultPojos) {
			builder.append("\tResultPojo: \n\n");
			builder.append("\tInputs: \n" + resultPojo.getInputs() + "\n\n");
			builder.append("\tOutputs: \n" + resultPojo.getOutputs() + "\n");
			builder.append("\n");
		}
		builder.append("\n\n");
		System.out.println(builder.toString());
	}

	public static void printKohnenStates(List<KohonenState> returnKohonenNeuronsState) {
		StringBuilder builder = new StringBuilder("Kohonen Neuron States: \n\n");
		for (KohonenState kohonenState : returnKohonenNeuronsState) {
			builder.append("State: \n");
			for (List<Double> row : kohonenState.getWeightMatrix()) {
				builder.append("\t" + row + "\n");
			}
		}
		builder.append("\n\n");
		System.out.println(builder.toString());
	}
}
